package com.mineplatform.mapper;

import java.util.ArrayList;
import java.util.List;


import com.mineplatform.domain.M_User;
import com.mineplatform.dto.rep.ExpertsItemRep;


public class ExpertsItemRepMapper {

	public static List<ExpertsItemRep> parse(List<M_User> users){
		

		List<ExpertsItemRep> list = new ArrayList<ExpertsItemRep>();

		for (M_User user : users) {

			ExpertsItemRep rep = new ExpertsItemRep();

			rep.setUserid(user.getId());;
			rep.setBecometime(user.getCreateTime());
			rep.setImgpath(user.getUserAvatar());
			rep.setUsername(user.getUserName());
			rep.setNickname(user.getUserNickName());			
			rep.setHot(user.getUserHot());
			rep.setOrder(user.getUserOrder());
			
			rep.setPrisecount(user.getPraiseCount());
			
			rep.setPrice(user.getPrice());
			
			list.add(rep);

		}

		return list;
	}
}
